There is an increasing need for a variety of objects to be equipped with the ability to send and receive messages. In the case of a home, for example, it may be desired that the objects in a room be capable of communicating with each other, and also potentially to be able to communicate with the internet or cloud. For example, the room may have a light, light switch, window and door. It may be desired that each of these objects be able to communicate with the others so that the home can be automated.
To enable objects to communicate, they may be equipped with a communication device that can communicate with similar communication devices attached to other objects. For this type of architecture, a large number of objects may be able to communicate with each other. The result can be a network of many communication devices, each associated with a respective object. As many of these objects may not have access to, or require, power themselves (for example, a window, door, packages sitting on a shelf, etc), there may be a desire for the devices that communicate on the objects' behalf to be battery-powered devices that consume only a small amount of power. It may also be desirable that these devices be able to communicate wirelessly with each other so that there is no need for cables running between them.
One suitable method of communication for such a network is to use a mesh networking protocol. This permits a first device to send a message to a second device, which may be outside the communication range of the first device, by transmitting the message via one or more intermediate devices. Historically, mesh networking protocols are typically designed around the concept of devices sending messages using complex routing tables. Such complex routing requires processing power which tends to increase power consumption of the devices. Such mesh networking protocols also tend to operate according to proprietary protocols. This means devices have to be manufactured specifically for the task of communicating according to a particular mesh network. This may be undesirable because it increases the cost of devices that might be installed in a multitude locations and/or attached to a multitude of different devices.
FIG. 1 shows an example of a network. The network comprises a number of devices 1. Each device can communicate wirelessly with the other devices that are in effective range of it. The devices can propagate signals from one device to another via other devices. For example, if device 1a transmits a signal, that signal can be received by devices 1b and 1c which are within range of device 1a. Devices 1b and 1c can then relay the signal received from device 1a so that it can be received by device 1d which is out of range of device 1a. This method of communication allows devices to communicate even though they are out of direct range of each other.
FIG. 1 shows a further device 1e which is out of wireless range of all the devices 1a to 1d. In a basic mesh network none of the devices 1a to 1d can communicate with device 1e using the mesh protocol. However, they may be able to communicate with device 1e using some other protocol. For example, devices 1a and 1e might be connected to a wired network as illustrated at 2, and that pair of devices may be able to communicate over that wired network. The wired network might be expected to use a different protocol from the wireless protocol. A consequence of that is that device 1a cannot simply forward messages of the mesh protocol to device 1e, which makes communications with device 1e inconvenient.
FIG. 2 shows a communication system comprising two mesh networks 20, 21. The first mesh network 20 comprises a number of devices 22 and device 23 which can communicate in an ad hoc manner to transfer data between each other. One of those devices, 23, is capable of communicating via a link 24 with a device 25 in the second network 21. The link 24 uses a protocol other than the mesh protocol. In the second network 21, device 25 and devices 26 can communicate with each other in an ad hoc manner. Devices 23 and 25 are configured to relay messages of the mesh protocol from network 20 over link 24 and inject them into network 21, and vice versa. In this way devices 22, which have no direct means of communication with devices in network 21 can communicate with devices 25 and 26. Devices 23 and 25 serve to bridge or tunnel between networks 20 and 21.
It can be advantageous to control some behavioural aspects of a device connected to the mesh network. Some aspects of their behaviour could be changed, for example, in dependence on their surrounding environment. For example, it may be useful to have lights that are connected to the mesh network to be able to automatically switch themselves on or off as a user moves around a building. In another example, it may be useful for the mesh network to maintain a certain level of service that ensures messages can get from one device to another device even if some intermediate relaying devices are running low on power and less capable of relaying message. In those examples, it may be useful to have knowledge of the location (absolute or relative to other devices) of the mesh devices so that their behaviour can be appropriately controlled. Thus there is a need for a method of determining the proximity of devices to other devices in a mesh network.